#!/bin/bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

rm -f /usr/bin/@@NAME@@
if [ -d /home/${SUDO_USER}/.config/@@NAME_LONG@@/installconfig ]; then
	rm -rf /home/${SUDO_USER}/.config/@@NAME_LONG@@/installconfig
fi

# Update mimetype database for removed workspace mimetype
if hash update-mime-database 2>/dev/null; then
	update-mime-database /usr/share/mime
fi

case "$1" in
	purge|P)
		rm -rf /home/${SUDO_USER}/.config/@@NAME_LONG@@
		rm -rf /home/${SUDO_USER}/@@DATA_FOLDER@@
	;;
esac
